<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>修改用户</title>
    <script type="text/javascript" src="../../../resources/js/lib/My97DatePicker/WdatePicker.js"
            th:src="@{/resources/js/lib/My97DatePicker/WdatePicker.js}"></script>
</head>
<body>
<form action="#" th:action="@{/user/addOrUpdate}" th:object="${user}" method="post">
    <input type="hidden" th:field="*{id}"/>

    <label>
        姓名：
        <input type="text" th:field="*{name}"/>
    </label>

    <br>

    <label>
        用户名：
        <input type="text" th:field="*{username}"/>
    </label>

    <br>

    <label>
        密码：
        <input type="text" th:field="*{password}"/>
    </label>

    <br>

    <label>
        年龄：
        <input type="text" th:field="*{age}"/>
    </label>

    <br>

    <label>
        性别：
        <select th:field="*{gender}">
            <option th:each="gender : ${genders}" th:value="${gender}" th:text="${gender.value}"></option>
        </select>
    </label>

    <br>

    <label>生日：
        <input type="text" class="Wdate" th:field="*{birthday}"
               onclick="WdatePicker({isShowClear:false,readOnly:true})"/>
    </label>


    <br>

    <input type="submit" value="提交"/>
</form>
</body>
</html>